﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Jzy.Model.HR
{
    public partial class EmployeeInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "Employee";
        }
        public override string GetInsertSql()
        {
            return "insert into Employee ( [ID], [Name], [IDNumber], [Code], [JobCode], [Gender], [Title], [LeaderID], [LeaderName], [Birthday], [HireDate], [Nation], [AreaCode], [AreaName], [Address], [Zip], [HomePhone], [OfficePhone], [Mobile], [Email], [QQ], [MSN], [Photo], [Status], [Orders], [Notes], [InputTime], [AllowEdit]) values ( @ID, @Name, @IDNumber, @Code, @JobCode, @Gender, @Title, @LeaderID, @LeaderName, @Birthday, @HireDate, @Nation, @AreaCode, @AreaName, @Address, @Zip, @HomePhone, @OfficePhone, @Mobile, @Email, @QQ, @MSN, @Photo, @Status, @Orders, @Notes, @InputTime, @AllowEdit)";
        }
        public override string GetUpdateSql()
        {
            return "update Employee set  [ID] = @ID, [Name] = @Name, [IDNumber] = @IDNumber, [Code] = @Code, [JobCode] = @JobCode, [Gender] = @Gender, [Title] = @Title, [LeaderID] = @LeaderID, [LeaderName] = @LeaderName, [Birthday] = @Birthday, [HireDate] = @HireDate, [Nation] = @Nation, [AreaCode] = @AreaCode, [AreaName] = @AreaName, [Address] = @Address, [Zip] = @Zip, [HomePhone] = @HomePhone, [OfficePhone] = @OfficePhone, [Mobile] = @Mobile, [Email] = @Email, [QQ] = @QQ, [MSN] = @MSN, [Photo] = @Photo, [Status] = @Status, [Orders] = @Orders, [Notes] = @Notes, [InputTime] = @InputTime, [AllowEdit] = @AllowEdit where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 姓名
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 身份证号
        /// </summary>
        public String IDNumber
        {
            get;
            set;
        }
        /// <summary>
        /// 工号
        /// </summary>
        public String Code
        {
            get;
            set;
        }
        /// <summary>
        /// 职务
        /// </summary>
        public String JobCode
        {
            get;
            set;
        }
        /// <summary>
        /// 性别
        /// </summary>
        public Boolean? Gender
        {
            get;
            set;
        }
        /// <summary>
        /// 职称
        /// </summary>
        public String Title
        {
            get;
            set;
        }
        /// <summary>
        /// 上级ID
        /// </summary>
        public Int32? LeaderID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String LeaderName
        {
            get;
            set;
        }
        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime? Birthday
        {
            get;
            set;
        }
        /// <summary>
        /// 入职日期
        /// </summary>
        public DateTime? HireDate
        {
            get;
            set;
        }
        /// <summary>
        /// 民族
        /// </summary>
        public String Nation
        {
            get;
            set;
        }
        /// <summary>
        /// 区域码
        /// </summary>
        public Int32? AreaCode
        {
            get;
            set;
        }
        /// <summary>
        /// 区域名称
        /// </summary>
        public String AreaName
        {
            get;
            set;
        }
        /// <summary>
        /// 地址
        /// </summary>
        public String Address
        {
            get;
            set;
        }
        /// <summary>
        /// 邮编
        /// </summary>
        public String Zip
        {
            get;
            set;
        }
        /// <summary>
        /// 家庭电话
        /// </summary>
        public String HomePhone
        {
            get;
            set;
        }
        /// <summary>
        /// 办公电话
        /// </summary>
        public String OfficePhone
        {
            get;
            set;
        }
        /// <summary>
        /// 手机
        /// </summary>
        public String Mobile
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Email
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String QQ
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String MSN
        {
            get;
            set;
        }
        /// <summary>
        /// 照 片
        /// </summary>
        public String Photo
        {
            get;
            set;
        }
        /// <summary>
        /// 状态
        /// </summary>
        public Int32? Status
        {
            get;
            set;
        }
        /// <summary>
        /// 排序
        /// </summary>
        public Int32? Orders
        {
            get;
            set;
        }
        /// <summary>
        /// 备注
        /// </summary>
        public String Notes
        {
            get;
            set;
        }
        /// <summary>
        /// 输入时间
        /// </summary>
        public DateTime InputTime
        {
            get;
            set;
        }
        /// <summary>
        /// 允许员工修改
        /// </summary>
        public Boolean AllowEdit
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "idnumber":
                    this.IDNumber = (String)value;
                    break;
                case "code":
                    this.Code = (String)value;
                    break;
                case "jobcode":
                    this.JobCode = (String)value;
                    break;
                case "gender":
                    this.Gender = (Boolean?)value;
                    break;
                case "title":
                    this.Title = (String)value;
                    break;
                case "leaderid":
                    this.LeaderID = (Int32?)value;
                    break;
                case "leadername":
                    this.LeaderName = (String)value;
                    break;
                case "birthday":
                    this.Birthday = (DateTime?)value;
                    break;
                case "hiredate":
                    this.HireDate = (DateTime?)value;
                    break;
                case "nation":
                    this.Nation = (String)value;
                    break;
                case "areacode":
                    this.AreaCode = (Int32?)value;
                    break;
                case "areaname":
                    this.AreaName = (String)value;
                    break;
                case "address":
                    this.Address = (String)value;
                    break;
                case "zip":
                    this.Zip = (String)value;
                    break;
                case "homephone":
                    this.HomePhone = (String)value;
                    break;
                case "officephone":
                    this.OfficePhone = (String)value;
                    break;
                case "mobile":
                    this.Mobile = (String)value;
                    break;
                case "email":
                    this.Email = (String)value;
                    break;
                case "qq":
                    this.QQ = (String)value;
                    break;
                case "msn":
                    this.MSN = (String)value;
                    break;
                case "photo":
                    this.Photo = (String)value;
                    break;
                case "status":
                    this.Status = (Int32?)value;
                    break;
                case "orders":
                    this.Orders = (Int32?)value;
                    break;
                case "notes":
                    this.Notes = (String)value;
                    break;
                case "inputtime":
                    this.InputTime = (DateTime)value;
                    break;
                case "allowedit":
                    this.AllowEdit = (Boolean)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "name":
                    return this.Name;
                case "idnumber":
                    return this.IDNumber;
                case "code":
                    return this.Code;
                case "jobcode":
                    return this.JobCode;
                case "gender":
                    return this.Gender;
                case "title":
                    return this.Title;
                case "leaderid":
                    return this.LeaderID;
                case "leadername":
                    return this.LeaderName;
                case "birthday":
                    return this.Birthday;
                case "hiredate":
                    return this.HireDate;
                case "nation":
                    return this.Nation;
                case "areacode":
                    return this.AreaCode;
                case "areaname":
                    return this.AreaName;
                case "address":
                    return this.Address;
                case "zip":
                    return this.Zip;
                case "homephone":
                    return this.HomePhone;
                case "officephone":
                    return this.OfficePhone;
                case "mobile":
                    return this.Mobile;
                case "email":
                    return this.Email;
                case "qq":
                    return this.QQ;
                case "msn":
                    return this.MSN;
                case "photo":
                    return this.Photo;
                case "status":
                    return this.Status;
                case "orders":
                    return this.Orders;
                case "notes":
                    return this.Notes;
                case "inputtime":
                    return this.InputTime;
                case "allowedit":
                    return this.AllowEdit;
                default:
                    return null;
            }
        }
    }


}
